// pages/person/person.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    name:"王先生",
    tel:"135 **** 2060",
    shoppingNumber: '3',
    detail1:[
      {
        image:"../images/person/dingdan.png",
        text: "我的订单",
        id: "../myOrder/myOrder"
      },
      {
        image: "../images/person/yueduizhang.png",
        text: "月对账单",
        id: "../monthlyStatement/monthlyStatement"
      },
      {
        image: "../images/person/xiaofen.png",
        text: "消费明细",
        id: "../consumptionDetails/consumptionDetails"
      },
      {
        image: "../images/person/jiaokuanchaxun.png",
        text: "交款查询",
        id: "../paymentRecord/paymentRecord"
      },                  
    ],
    detail2: [
      {
        image: "../images/person/jifen.png",
        text: "我的积分",
        id: ""
      },
      {
        image: "../images/person/daijinquan.png",
        text: "代金券",
        id: "../cashCouponDetail/cashCouponDetail"
      },
      {
        image: "../images/person/address.png",
        text: "地址管理",
        id: "../address/address"
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.setTabBarBadge({//购物车数量
      index: 1,
      text: this.data.shoppingNumber,
      color: "black"
    })
  },
  goHtml: function (event) {
    var newsid = event.currentTarget.dataset.newsid
    wx.navigateTo({
      url: newsid
      // 跳转各个页面详情
    })
  },
})